constructor() {
super();
- this._indicator.add_style_class_name('privacy-indicator');
-
this._indicator.connect('scroll-event',
(actor, event) => this._handleScrollEvent(this._input, event));
if (icon)
this._indicator.icon_name = icon;
+ this._updatePrivacyIndicator();
});
this._input.bind_property('visible',
this._onControlStateChanged();
}
+ _updatePrivacyIndicator() {
+ // Muted microphone doesn't need privacy indicator (no privacy concern)
+ const {isMuted} = this._input._stream;
+ if (isMuted)
+ this._indicator.remove_style_class_name('privacy-indicator');
+ else
+ this._indicator.add_style_class_name('privacy-indicator');
+ }
+
_onControlStateChanged() {
if (this._control.get_state() === Gvc.MixerControlState.READY)
this._readInput();